package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxsy_work_picture;
import cn.bj.dao.Yxsy_work_pictureMapper;

@Service
public class YxsyWorkPictureService {
	@Autowired
	Yxsy_work_pictureMapper yxsy_work_pictureMapper;

	// 查询所有
	public List<Yxsy_work_picture> getAllYxsyWorkPicture() {
		return yxsy_work_pictureMapper.selectByExample(null);
	}

	// 新增
	public int insertYxsyWp(Yxsy_work_picture yxsyWP) {
		return yxsy_work_pictureMapper.insert(yxsyWP);
	}

	// 删除
	public int deleteByYxsyWP(Integer id) {
		return yxsy_work_pictureMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxsy_work_picture selectById(Integer id) {
		return yxsy_work_pictureMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateYxsyWp(Yxsy_work_picture yyp) {
		return yxsy_work_pictureMapper.updateByPrimaryKey(yyp);
	}

}
